pkgname=xssstate
pkgver=1.1
pkgrel=5
pkgdesc='A simple tool to retrieve the X screensaver state'
arch=('loong64' 'x86_64')
url="https://tools.suckless.org/$pkgname"
license=('MIT')
depends=('libxss' 'sh')
source=("https://dl.suckless.org/tools/$pkgname-1.1.tar.gz")
md5sums=('7d4935bc17b6f01afa12e420331fa688')
sha256sums=('c4b6f504a6a8eb247bc60960bd65cbf9631c008449a1d71ac4c55e34be1c6011')

build() {
  cd "$srcdir/$pkgname-$pkgver"
  make PREFIX=/usr DESTDIR="$pkgdir"
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  make PREFIX="/usr" DESTDIR="$pkgdir" install

  install -Dm0644 README "$pkgdir/usr/share/doc/xssstate/README"
  install -Dm0644 xsidle.sh "$pkgdir/usr/share/doc/xssstate/xsidle.sh"
  install -Dm0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
